package com.shuwen.gcdj.bean.dictionaryItem.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@Data
@EqualsAndHashCode(callSuper = false)
public class DictionaryItemAddParam {

    @ApiModelProperty(value = "编码")
    private String code;

    @ApiModelProperty(value = "编码值")
    private String codeValue;

    @ApiModelProperty(value = "字典ID", required = true)
    @NotBlank
    private String dictionaryId;

    @ApiModelProperty(value = "父级选项ID")
    private String parentId;

    @ApiModelProperty(value = "名称", required = true)
    @NotBlank
    @Size(max = 50, message = "选项名称不能超过50个字")
    private String name;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "是否启用：0-否，1-是")
    @Range(min = 0, max = 1, message = "是否启用只能传0或1")
    private Integer status;

    @ApiModelProperty(value = "是否公共：0-否，1-是")
    @Range(min = 0, max = 1, message = "是否启用只能传0或1")
    private Integer publicStatus ;

}
